
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H

#include "Layout.h"
#include "StringUtil.h"

/** @class ConfigSettings
    Singleton class which stores the configuration settings.
*/
class ConfigSettings
{
private:
    static ConfigSettings* mInstance;    ///< Single instance of the class
    bool    mIsValid;                   ///< Indicates if the settings are valid
    ConfigSettings();

public:
    StringUtil::String  mFontDirectory;

public:
    /** Get a reference to the configuration settings */
    static ConfigSettings& GetInstance();

    /** Get a pointer to the configuration settings */
    static ConfigSettings* GetInstancePtr();

    /** Read the configuration settings */
    bool ReadSettings();

    /** Write the configuration settings */
    void WriteSettings() const;

    /** Check if the settings are valid */
    bool IsValid() const;

};

/** @class ConfigDialog
    Dialog for editing the configuration preferences.
*/
class ConfigDialog : public ConfigDlg
{
public:
    ConfigDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,153 ), long style = wxDEFAULT_DIALOG_STYLE );
    ~ConfigDialog(void);

protected:
    void OnOK( wxCommandEvent& event );
};

#endif  // CONFIGDIALOG_H
